<template>
	<view>
		<view class="header">
			<image src="@/static/zuo.png" mode="" style="width: 45upx;height: 45upx;" @click="back"></image>
			<text style="font-size: 36upx;margin-left: 30upx;color: #333;">个人介绍</text>
			<text style="font-size: 36upx;margin-left: 400upx;color: #333;" @click="queding">确定</text>
		</view>
		<view class="" style="width: 690upx;height: 800upx;margin: 0 auto;padding-top: 140upx;display: flex;flex-direction: column;align-items: flex-end;margin-left: 40upx;">
			<textarea name="" id="" cols="30" rows="10" placeholder="等待输入内容" style="background-color: #fff;width: 690upx;height: 800upx;padding: 20upx;padding-right: 0;padding-left: 20upx;" v-model="neir"></textarea>
			<text style="color: #333333;font-size: 25upx;padding-top: 20upx;">{{neir.length}}/300</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				neir:'',
				useid:""
			}
		},
		onLoad(option) {
			this.useid = option.useid
			uni.request({
				url: 'https://dsx.cdzer.com/api/MemberInfo/getuserinfo', //仅为示例，并非真实接口地址。
				method: 'POST',
				data: {
					uid: option.useid
				},
				header: {
					'content-type': 'application/x-www-form-urlencoded',
				},
				success: (res) => {
					console.log(res, "sdadasdasdas")
					this.userinfos =  res.data.data
					this.neir = res.data.data.evaluation
				}
			});
		},
		methods: {
			back(){
				uni.navigateBack({
					delta:1
				})
			},
			queding(){
				const data = {
					evaluation: this.neir,
				};
				this.$http.youshi(data).then(res => {
					
					if (res.status == 200) {
						console.log(res, "保存资料")
						this.$hideLoading()
						uni.showToast({
							title: res.mess
						})
						setTimeout(() => {
							uni.navigateBack({
								delta:1
							})
						}, 1200)
					} else {
						uni.showToast({
							title: res.mess,
							icon: 'none'
						})
					}
				})
			}
		}
	}
</script>

<style scoped lang="scss">
.header {
		position: fixed;
		background-color: #fff;
		height: 110upx;
		width: 100%;
		top: 0;
		left: 0;
		display: flex;
		z-index: 100;
		align-items: center;
		padding-left: 30upx;
	}
</style>
